package cn.aeolia.demo;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Parameter;
import java.lang.reflect.TypeVariable;

/**
 * @Author aeolia
 * @Date 2021/8/15 18:07
 */
public class Test {
    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Class<Demo> demoClass = Demo.class;

        Constructor<Demo> constructor = demoClass.getConstructor();
        constructor.setAccessible(true);
        Demo demo = constructor.newInstance();
        Parameter[] parameters = constructor.getParameters();
        for (Parameter parameter : parameters) {
            System.out.println(parameter.getName());
        }


    }


}
